<template>
    <div class="jianzhan-content">
        <Crumb name="User Log"></Crumb>

        <div class="content">
            <div class="table-wrapper">
                <el-table
                        :data="logList"
                        stripe
                        border
                        style="width: 100%">
                    <el-table-column
                            label="User Name"
                            prop="loginUser"
                            >
                    </el-table-column>
                    <el-table-column
                            prop="loginTimeStr"
                            label="Login Time"
                            >
                    </el-table-column>
                    <el-table-column
                            prop="operateIp"
                            label="IP">
                    </el-table-column>
                </el-table>
            </div>
        </div>

    </div>
</template>

<script>
    import Crumb from '../../components/common/crumb'
    import {userLog} from "../../api";
    import {ERROR_OK} from "../../util/config";

    export default {
        name: "warehouse",
        data(){
            return {
                logList:[],

            }
        },
        created(){
            this.getLogList()
        },
        methods:{
            async getLogList(){
                const {status,data} = await userLog();
                if(status === ERROR_OK) {
                    this.logList = data
                }
            }
        },
        components:{Crumb}
    }
</script>

<style scoped lang="scss">
    @import "../../css/mixins";
    .content{
        @include content
    }
</style>